#ifndef THEME_MANAGER_H
#define THEME_MANAGER_H

#include <QObject>
#include <QColor>
#include <QPalette>
#include <QApplication>

class ThemeManager : public QObject
{
    Q_OBJECT

public:
    enum Theme {
        Light,
        Dark
    };
    
    Q_ENUM(Theme)
    
    explicit ThemeManager(QObject *parent = nullptr);
    
    static ThemeManager* instance();
    
    Theme currentTheme() const;
    
    void setTheme(Theme theme);
    
    // 获取特定颜色
    QColor color(const QString &role) const;
    
    // 获取调色板
    QPalette palette() const;
    
signals:
    void themeChanged(Theme theme);

private:
    static ThemeManager* s_instance;
    Theme m_currentTheme;
};

#endif // THEME_MANAGER_H